package com.uzai.console.service.feign;

import com.uzai.console.common.UzaiRespVo;
import com.uzai.console.dto.feign.pddorder.*;
import com.uzai.console.service.feign.impl.PddOrderFeignFallbackFactory;
import com.uzai.console.vo.pdd.pddorder.feign.PddOrderBindVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Auther: jianghan
 * @Date: 2021/11/24 16:22
 * @Description:
 */
@Component
@FeignClient(value = "uzai-order-server", fallbackFactory = PddOrderFeignFallbackFactory.class)
public interface PddOrderFeignService {

    /**
     * 拼多多订单确认收货
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param pddOrderSettledDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/settled/pdd/order")
    UzaiRespVo<Object> settled(@RequestBody PddOrderSettledDto pddOrderSettledDto);

    /**
     * 拼多多订单解冻
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param pddOrderUnfreezeDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/unfreeze/pdd/sync")
    UzaiRespVo<Object> unfreeze(@RequestBody PddOrderUnfreezeDto pddOrderUnfreezeDto);

    /**
     * 拼多多订单解绑用户
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param pddOrderUnbindDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/unbind/pdd/sync")
    UzaiRespVo<Object> unbind(@RequestBody PddOrderUnbindDto pddOrderUnbindDto);

    /**
     * 拼多多订单绑定用户
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param pddOrderBindDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/bind/pdd/async")
    UzaiRespVo<Object> bind(@RequestBody PddOrderBindDto pddOrderBindDto);

    /**
     * 拼多多订单拉取接口
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param pddOrderPullDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/pull/pdd/orderByToken")
    UzaiRespVo<Boolean> pull(@RequestBody PddOrderPullDto pddOrderPullDto);
}
